//
// Created by ZLY on 2025/3/29.
//

#ifndef AVFRAMEQUEUE_H
#define AVFRAMEQUEUE_H
#include "Queue.h"
#include "Log.h"
extern "C" {
#include <libavformat/avformat.h>
}


class AVFrameQueue {
public:
    AVFrameQueue();

    ~AVFrameQueue();

    void Abort();

    int Push(AVFrame *frame);

    int Size();
    AVFrame *Pop(const int timeout);

    AVFrame *Front();

private:
    Queue<AVFrame *> queue_;
    void release();
};


#endif //AVFRAMEQUEUE_H
